import React from "react";
import { Tag, Icon } from "antd";
import styles from "./editingStyle.less"

class SlotEdit extends React.Component {
	render() {
		const { data, removeSlot, urlPrefix } = this.props;
		return (
			<div>
				{data.map((item) => {
					return (
						<Tag
							closable={!urlPrefix}
							onClose={() => removeSlot(item)}
							key={item.id}
              className={styles.slotTag}
						>
							&lt;{item.name}&gt;-{item.key ? item.key : item.keyName}
						</Tag>
					);
				})}
			</div>
		);
	}
}

export default SlotEdit;
